home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Database How-To
/
Visual Basic 4 Database - How-to (The Waite Group)(1995).iso
/
reccount.fr_
/
reccount.fr
Wrap
Text File
|
1995-07-04
|
5KB
|
146 lines
VERSION 4.00
Begin VB.Form Form1
BackColor = &H00C0C0C0&
Caption = "Record Counts"
ClientHeight = 3420
ClientLeft = 870
ClientTop = 1455
ClientWidth = 6570
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 3825
Left = 810
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3420
ScaleWidth = 6570
Top = 1110
Width = 6690
Begin VB.CommandButton cmdExit
Cancel = -1 'True
Caption = "Exit"
Default = -1 'True
Height = 615
Left = 2640
TabIndex = 3
Top = 2580
Width = 1455
End
Begin VB.Label lblDynasetMoved
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 315
Left = 4980
TabIndex = 6
Top = 1800
Width = 1155
End
Begin VB.Label lblDynasetCreate
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 315
Left = 4980
TabIndex = 5
Top = 1020
Width = 1155
End
Begin VB.Label lblTable
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 315
Left = 4980
TabIndex = 4
Top = 300
Width = 1155
End
Begin VB.Label Label3
BackColor = &H00C0C0C0&
Caption = "Records in the BIBLIO.MDB SELECT * FROM Authors dynaset after using the MoveLast method."
Height = 675
Left = 480
TabIndex = 2
Top = 1680
Width = 4215
End
Begin VB.Label Label2
BackColor = &H00C0C0C0&
Caption = "Records in the BIBLIO.MDB SELECT * FROM Authors dynaset immediately after creation."
Height = 435
Left = 480
TabIndex = 1
Top = 960
Width = 4095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "Records reported in the BIBLIO.MDB Authors table recordset:"
Height = 435
Left = 480
TabIndex = 0
Top = 240
Width = 4155
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim db As DATABASE
Dim tbl As Recordset
Dim dyn As Recordset
Dim dbName As String
' Get the database name and open the database.
dbName = BiblioPath() ' BiblioPath is a function in READINI.BAS
Set db = DBEngine.Workspaces(0).OpenDatabase(dbName)
Set tbl = db.OpenRecordset("Authors", dbOpenTable)
lblTable = tbl.RecordCount
Set dyn = db.OpenRecordset("SELECT * FROM Authors", dbOpenDynaset)
lblDynasetCreate = dyn.RecordCount
dyn.MoveLast
dyn.MoveFirst
lblDynasetMoved = dyn.RecordCount
End Sub
Private Sub cmdExit_Click()
End
End Sub